from conftest import login_token4
import pytest,requests


class Test_science:
    # 咨询广告
    def test_science_01(self,login_token4):
        userId,sessionId=login_token4
        url='https://10.59.9.18/techApi/information/v1/findInfoAdvertising'
        headers={
            'userId':str(userId),
            'sessionId':str(sessionId)
        }

        r=requests.get(url=url,headers=headers,verify=False)
        r_json=r.json()
        print(r_json)
    #咨询积分兑换
    def test_science_02(self,login_token4):
        userId,sessionId=login_token4
        url='https://10.59.9.18/techApi/information/verify/v1/infoPayByIntegral'
        headers={
            'userId':str(userId),
            'sessionId':str(sessionId)
        }
        data={
            'infoId':3,
            'integralCost':10
        }
        r=requests.post(url=url,headers=headers,params=data,verify=False)
        r_json=r.json()
        print(r_json)